import { defineConfig } from 'vite'
import uni from '@dcloudio/vite-plugin-uni'
import AutoImport from 'unplugin-auto-import/vite'
 
export default defineConfig({
	plugins: [
		uni(),
		AutoImport({
			imports: ['vue', 'uni-app'] // 自动引入vue的ref、toRefs、onmounted等，无需在页面中再次引入
		})
		
	],
	server: {
		proxy: {
			'/api': {
				target: "http://202.168.123.46:5006/",
				changeOrigin: true,
				rewrite: path => path.replace(/^\/api/, '/'),
			}
		}
	}
})